﻿using SocketBook7Server.Script.net;

namespace SocketBook7Server.Script.logic
{
    public class Player
    {
        //id
        public string id = "";
        //指向ClientState
        public ClientState state;
        //构造函数
        public Player(ClientState state)
        {
            this.state = state;
        }
        //临时数据，如：坐标
        public float x;
        public float y;
        public float z;
        //数据库数据
        public PlayerData data;

        //坐标和旋转
        public float ex;
        public float ey;
        public float ez;
        //在哪个房间
        public int roomId = -1;
        //阵营
        public int camp = 1;
        //坦克生命值
        public int hp = 100;

        //发送信息
        public void Send(MsgBase msgBase)
        {
            NetManager.Send(state, msgBase);
        }
    }
}
